import { service } from '@/utils';

enum Api {
  login = '/admin/login'
}

interface LoginParams {
  username: string;
  password: string;
}

// 登录接口
export const login = (data: LoginParams) => {
  return service.request({
    url: Api.login,
    method: 'post',
    data
  });
};
